package com.dili.dd.gpi.service;


import com.dili.dd.gpi.domain.Application;
import com.dili.dd.gpi.util.spring.DataSourceLookupKey;
import com.dili.dd.gpi.util.spring.RequireDataSource;

import java.util.List;

/**
 * Created by 思思君 on 2015/10/14.
 */
public interface DmaAppService
{
    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    int createApplyApp(Application application);

    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    List<Application> getAppList(String username);

    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    int deleteApp(String appId);

    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    Application getAppById(String appId);

    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    Application getAppByName(String appName);

    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    int updateApp(Application application);

    @RequireDataSource(key = DataSourceLookupKey.DMA_DATASOURCE)
    List<Application> getAllAppList();
}
